using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace ExcellOnServices.Models
{
    public partial class Order
    {
        //Confirm when admin send mail to inform company about total money.
        // Activated when company have paid money.
        public enum StatusOrder { Pending = 0, Canceled = 1, Confirmed = 2, Activated = 3, Expired = 4};
        public enum PaymentType { Cash = 0, CreditCard = 1};

        public Order()
        {
            this.OrderItems = new List<OrderItem>();
        }

        public int Id { get; set; }
        [Required]
        [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
        public System.DateTime BeginDateTime { get; set; }
        [Required]
        [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
        public System.DateTime EndDateTime { get; set; }
        public StatusOrder Status { get; set; }
        public PaymentType Payment { get; set; }
        public string Properties { get; set; }
        public Nullable<System.DateTime> CreatedDateTime { get; set; }
        public Nullable<System.DateTime> ModifiedDateTime { get; set; }
        public virtual ICollection<OrderItem> OrderItems { get; set; }
    }
}
